home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / dos_win / winsock / maillist / 94-05.Z / 94-05 / 000340_news@bigblue.oit.unc.edu_Tue May 24 16:44:53 1994.msg < prev    next >
Internet Message Format  |  1994-05-31  |  3KB

  1. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  2.           id AA14166; Tue, 24 May 1994 17:55:34 -0400
  3. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  4.           id AA30571; Tue, 24 May 1994 17:47:09 -0400
  5. Received: from GATEWAY by bigblue with netnews
  6.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  7. To: winsock@sunsite.unc.edu
  8. Date: Tue, 24 May 1994 16:44:53 GMT
  9. From: rharfor@symantec.com (ROB)
  10. Message-Id: <rharfor.72.2DE22F05@symantec.com>
  11. Organization: Symantec
  12. Sender: ses
  13. Subject: programming winsock dll
  14.  
  15. hi there,
  16.  
  17. I seem to be having problems programming sockets using Borlands c++ V4
  18.  
  19. I have the users IP address in a string lpstring, I then used the function 
  20. inet_addr(lpstring) to get an unsigned long version of the host name. this is 
  21. stored in rob1
  22.  
  23. e.g.
  24.  
  25. unsigned long rob1
  26. rob1= inet_addr(lpstring)
  27.  
  28. The winsock help, says I should then use the comamnd gethostbyaddr to get the 
  29. host details.
  30.  
  31. The problem is that gethostbyaddr requires the ip address to be in the format 
  32. const char far *
  33.  
  34. My IP address is in the format unsigned long.
  35.  
  36. When I cast the data, I get 
  37.  
  38. host = gethostbyaddr(const char *)rob1,.....)
  39.  
  40. This compiles ok, but GPF's on this line,as the address is invalid.
  41.  
  42. So I tried ...
  43.  
  44. host=gethostbyaddr(&rob1,....)
  45.  
  46. But this failed to compile, complaining about the different typedefs ?
  47.  
  48. Any ideas anyone , or does anyone have any examples?
  49.  
  50. Cheers rob.
  51. From news@bigblue.oit.unc.edu Sat May 24 21:52:50 1994
  52. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  53.           id AA21697; Tue, 24 May 1994 18:25:26 -0400
  54. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  55.           id AA25806; Tue, 24 May 1994 18:02:05 -0400
  56. Received: from GATEWAY by bigblue with netnews
  57.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  58. To: winsock@sunsite.unc.edu
  59. Date: 24 May 1994 21:52:50 GMT
  60. From: nwb@bu.edu (Noel Bracero)
  61. Message-Id: <2rtsvi$96q@news.bu.edu>
  62. Organization: Boston University
  63. Sender: ses
  64. Subject: Re: Will help setup SLIP for food;)
  65.  
  66. ..[crap deleted]
  67. Not really a joke, more of an experiment using the stupid pricks 
  68. who don't give assistance to new users.  I have read more complaints 
  69. about newbies than trying to help them (my apologies to those who do 
  70. help).
  71.  
  72. It is easily set up when people help out!  It took me a month starting 
  73. from when I first posted a request for info but since nobody responded 
  74. to the requests for info over more than three of those weeks it was 
  75. mostly wasted time.  Since the IT department over here is incompetent 
  76. for the most part, I had the opportunity to be ignored on this newsgroup 
  77. I knew of several other people with similar experiences before I posted 
  78. the original article.  The only reason I got any help was because I 
  79. stumbled on someone with a setup at school.  I've only gotten info 
  80. on latest releases here.  By the way once I did talk to the person 
  81. I had downloaded and set everything up by the end of the day!